<template>
    <div id="list-container" v-if="dataList">
      <!-- S 数据展示 -->
      <ul>
        <li v-for="val in dataList" @click="toApplyPassword(val)">
          <span>{{val.name}}</span>
          <i class="pointer"></i>
        </li>
      </ul>
      <!-- E 数据展示 -->
    </div>
</template>

<script>
  export default {
      name: "companyList",
      props:['dataList'],
      data(){
        return {
        }
      },
      methods:{
        toApplyPassword(val){
          location.href = "/password/apply?id="+val.id+"&companyName="+val.name;
        }
      }
  }
</script>

<style lang="scss" scoped>
  #list-container{
    ul li{
      position: relative;
    }
    .pointer{
      width: .21rem;
      height: .38rem;
      background: green;
      display: inline-block;
      position: absolute;
      z-index: 111;
      margin: auto;
      top: 0;
      bottom: 0;
      right: 0;
      background: url(/images/password/right-pointer.png) center no-repeat;
      background-size: contain;
    }
  }
</style>
